
#import "BaseViewController.h"

@interface BaseViewController ()

@end

@implementation BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = UIColor.whiteColor;
    if (self.navigationController.viewControllers.count > 1) {
        UIImage *image = [UIImage imageNamed:@"icon_add_arrow_left"];
        self.navigationItem.leftBarButtonItem =  [[UIBarButtonItem alloc]initWithImage:image style:UIBarButtonItemStylePlain target:self action:@selector(backItemAction)];
        self.navigationController.interactivePopGestureRecognizer.delegate = (id<UIGestureRecognizerDelegate>)self;
    }
}

- (void)backItemAction {
    [self.navigationController popViewControllerAnimated:YES];
}

@end
